import request from '@/utils/request'

// 上传文档 须包含bucketName、appName、category和文档列表
export const uploadfile = (params) => {
  return request({
    url: '/equipment/file/upload',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: params,
  })
}
// 删除文档
export const delDoc = (id) => {
  return request({
    url: '/equipment/file/del/' + `${id}`,
    method: 'delete',
  })
}

// 获取文档列表
export const getDocList = (appName, category, fileType) => {
  return request({
    url: '/equipment/file/list',
    method: 'get',
    params: {
      appName: appName,
      category: category,
      fileType: fileType,
    }
  })
}